package com.eci.common.asset.kit;

import java.util.List;

import com.fasterxml.jackson.annotation.JsonProperty;

/** 从token中获取到的用户数据信息 
 * */
public class JwtUserInfo {
	
	 
	/**账户ID*/ 
	@JsonProperty(value = "aid")
	private String accountId;
	/**职工ID*/ 
	@JsonProperty(value = "eid")
	private String empId;
	/**职工名称*/ 
	@JsonProperty(value = "ename")
	private String empName;
	
	/**关联老系统的职工ID*/ 
	@JsonProperty(value = "oldid")
	private Integer oldEmpId;
	/**登录名*/ 
	@JsonProperty(value = "user_name")
	private String loginName;
	/**账户类型*/ //1平台超管 2普通用户
	@JsonProperty(value = "atype")
	private String type;
	/**归属公司ID*/ 
	@JsonProperty(value = "oid")
	private Integer companyId;  
	/**所属部门ID*/ 
	@JsonProperty(value = "did")
	private Integer deptId; 
	/**拥有职位ID*/ 
	@JsonProperty(value = "pid")
	private Integer postId;
	
	/**拥有职位所属组ID*/ 
	@JsonProperty(value = "hpid")
	private Integer hrPostId;
	
	/**挂靠的岗位ID集合*/ 
	@JsonProperty(value = "attachs")
	private String attachPostIds;
	
	/**企业微信账号*/ 
	@JsonProperty(value = "qywx")
	private String wecomAccount;
	
	/**JWT相关的作用域*/ 
	@JsonProperty(value = "scope")
	private List<String>  scope;
	/**JWT相关的有效时长*/ 
	@JsonProperty(value = "exp")
	private long exp;
	/**JWT相关的权限ID集合*/ 
	@JsonProperty(value = "authorities")
	private List<String> authorities;
	/**JWT相关的jti*/ 
	@JsonProperty(value = "jti")
	private String jti;
	/**JWT相关的客户端ID*/ 
	@JsonProperty(value = "client_id")
	private String clientId;

	public JwtUserInfo() {
		
	}
	
	
	private  JwtUserInfo(String accountId, String empId, String empName, String loginName) {
		super();
		this.accountId = accountId;
		this.empId = empId;
		this.empName = empName;
		this.loginName = loginName;
	}
	private static class SingletonUser {
		private static final JwtUserInfo UNKNOWN = new JwtUserInfo("unknown_user","unknown_user","unknown_user","unknown_user"); 
	}
	
	
	public static JwtUserInfo unknownUser() {
		return  SingletonUser.UNKNOWN;
	}
	
	
	public String getAccountId() {
		return accountId;
	}
	public void setAccountId(String accountId) {
		this.accountId = accountId;
	}
	public String getEmpId() {
		return empId;
	}
	public void setEmpId(String empId) {
		this.empId = empId;
	}
	public String getEmpName() {
		return empName;
	}
	public void setEmpName(String empName) {
		this.empName = empName;
	} 
	
	public Integer getOldEmpId() {
		return oldEmpId;
	} 

	public void setOldEmpId(Integer oldEmpId) {
		this.oldEmpId = oldEmpId;
	}


	public String getLoginName() {
		return loginName;
	}
	public void setLoginName(String loginName) {
		this.loginName = loginName;
	}
	public String getType() {
		return type;
	}
	public void setType(String type) {
		this.type = type;
	}
  
	public Integer getCompanyId() {
		return companyId;
	}
 
	public void setCompanyId(Integer companyId) {
		this.companyId = companyId;
	} 

	public Integer getDeptId() {
		return deptId;
	}


	public void setDeptId(Integer deptId) {
		this.deptId = deptId;
	}


	public Integer getPostId() {
		return postId;
	}


	public void setPostId(Integer postId) {
		this.postId = postId;
	} 
	public Integer getHrPostId() {
		return hrPostId;
	}


	public void setHrPostId(Integer hrPostId) {
		this.hrPostId = hrPostId;
	}


	public String getAttachPostIds() {
		return attachPostIds;
	}


	public void setAttachPostIds(String attachPostIds) {
		this.attachPostIds = attachPostIds;
	}


	public String getWecomAccount() {
		return wecomAccount;
	} 

	public void setWecomAccount(String wecomAccount) {
		this.wecomAccount = wecomAccount;
	} 

	public List<String> getScope() {
		return scope;
	}
	public void setScope(List<String> scope) {
		this.scope = scope;
	}
	public long getExp() {
		return exp;
	}
	public void setExp(long exp) {
		this.exp = exp;
	}
	public List<String> getAuthorities() {
		return authorities;
	}
	public void setAuthorities(List<String> authorities) {
		this.authorities = authorities;
	}
	public String getJti() {
		return jti;
	}
	public void setJti(String jti) {
		this.jti = jti;
	}
	public String getClientId() {
		return clientId;
	}
	public void setClientId(String clientId) {
		this.clientId = clientId;
	}
  
	 
	
	

}
